// JointPortFormersOfPartFormat.cpp: implementation of the JointPortFormersOfPartFormat class.
//
//////////////////////////////////////////////////////////////////////

#include "StdAfx.h"
#include "JointPortFormersOfPartFormat.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

namespace JointSystem
{

JointPortFormersOfPartFormat::~JointPortFormersOfPartFormat()
{
	for ( int i = 0; i < m_JPFs.GetSize(); i++ )
		delete m_JPFs.GetAt( i );
	m_JPFs.RemoveAll();
}

JointPortFormer* JointPortFormersOfPartFormat::Get(const CString& strPortID)
{
	for(int i = 0; i < m_JPFs.GetSize(); i++)
	{
		JointPortFormer* pFormer = m_JPFs.GetAt(i);
		if(pFormer->SerialNumber() == strPortID)
			return pFormer;
	}
	return NULL;
}
}